The chemical composition of rocks and soils on Mars analyzed during the Mars Exploration Rover Spirit Mission was determined by X-ray analyses with the Alpha Particle X-Ray Spectrometer (APXS). Details of the data analysis method and the instrument calibration are presented. Measurements performed on Mars to address geometry effects and background contributions are shown. Cross calibration measurements among several instrument sensors and sources are discussed. An unintentional swap of the two flight instruments is evaluated. New concentration data acquired during the first 470 sols of rover Spirit in Gusev Crater are presented. There are two geological regions, the Gusev plains and the Columbia Hills. The plains contain soils that are very similar to previous landing sites on Mars. A meteoritic component in the soil is identified. Rocks in the plains revealed thin weathering rinds. The underlying abraded rock was classified as primitive basalt. One of these rocks contained significant Br that is probably associated with vein-filling material of different composition. One of the trenches showed large subsurface enrichments of Mg, S, and Br. Disturbed soils and rocks in the Columbia Hills revealed different elemental compositions. These rocks are significantly weathered and enriched in mobile elements, such as P, S, Cl, or Br. Even abraded rock surfaces have high Br concentrations. Thus, in contrast to the rocks and soils in the Gusev Plains, the Columbia Hills material shows more significant evidence of ancient aqueous alteration.